package demo.gojapn.translationdemo.entity;

/**
 * Created by x.chen on 2015/10/12 0012.
 */
public class BaseEntity {
  public   enum  Type {
        TransItem(1) ,
        TransSep(0);

        private int value;
        private Type(int value) {    //    必须是private的，否则编译错误
            this.value = value;
        }

        public static Type valueOf(int value) {
            switch (value) {
                case 1:
                    return TransItem;
                case 0:
                    return TransSep;
                default:
                    return null;
            }
        }

        public int value() {
            return this.value;
        }
    }
    protected Type type;
    protected String content_ch;


    public Type getType() {
        return type;
    }
    public int getType2Int() {
        return type.value();
    }
    public void setType(Type type) {
        this.type = type;
    }

    public String getContent_ch() {
        return content_ch;
    }

    public void setContent_ch(String content_ch) {
        this.content_ch = content_ch;
    }
}
